package cl.utfsm.inf.lp.sem12013.tarea2.logic;

import java.awt.Point;


/**
 * @author Grupo 23
 *
 */
public class WaterEntity extends EntityAbstract {
	private static final long WATER_NEEDS_WATERTOWER = 50;
	
	private static final long WATER_GENERATED_WATERPUMP = 200;
	private static final long WATER_MAX_STOCK_WATERPUMP = 200;
	
	public static final int TYPE_WATERPUMP = 1;
	public static final int TYPE_WATERTOWER = 2;
	
	private int houses =-1;
	
	/**
	 * @param type
	 * @param location
	 * @param name
	 */
	public WaterEntity(int type, Point location, String name) {
		super(name,location);
		switch(type){
			case TYPE_WATERPUMP:
				this.generatedRes.add("Agua");
				this.resGenerPerTurn.add(WATER_GENERATED_WATERPUMP);
				this.resGenerCap.add(WATER_MAX_STOCK_WATERPUMP);
				this.resGenerStock.add(0L);
				break;
			case TYPE_WATERTOWER:
				this.requiredRes.add("Agua");
				this.resReqCap.add(0L);
				this.resReqStock.add(0L);
				this.resReqPerTurn.add(WATER_NEEDS_WATERTOWER*this.getHouses());
				break;
		}
	}
	
	/**
	 * @return
	 */
	private int getHouses() {
		if(this.houses==-1){
			
		}
		return 0;
	}

}
